package com.aistar.service.job;

import com.aistar.model.dto.job.LabelTypeAndTag;
import com.aistar.model.dto.job.RecruitmentAndCompanyDTO;
import com.aistar.model.entity.LabelType;
import com.aistar.model.entity.Recruitment;
import com.aistar.model.entity.Resume;
import com.aistar.model.entity.Tag;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface IRecruitmentService {

    List<Recruitment> search();

    Recruitment loadRecruitment(Integer id);

    String titleName(Integer id);

    PageInfo<Recruitment> cutPage(String name, String experience, String education, @RequestParam(defaultValue = "3")Integer salaryLower, @RequestParam(defaultValue = "20") Integer salaryUpper,String province,String city,String district, Integer page, Integer limit,Integer tagId);

    List<RecruitmentAndCompanyDTO> searchAll();

    //通过id查找福利
    String searchWelfare(Integer id);

    //通过公司id查找职位数量
    Integer searchRecruitment(Integer id);

    //根据求职者id获取简历信息
    List<Resume> findByRecruitmentId(Integer id);

    //根据公司id获取招聘者人数
    Integer countEmployer(Integer id);

    //通过公司id获取职位
    List<Recruitment> searchByCompanyId(Integer id);

    //通过大标签id获取标签
    List<LabelTypeAndTag> tagIdByType();

    //根据id获取次数
    int searchFrequency(Integer id);

    //根据公司id获取职位分页
    PageInfo<Recruitment> searchCidAndPage(Integer id, Integer page, Integer limit);

    void SendEmail(Integer id,Integer rsid);

    List<Recruitment> searchLower(String name, String experience, String education,Integer salaryLower,Integer salaryUpper);

    // 根据职位id加载福利
    List<String> findWelfareByRecruitmentId(Integer recruitmentId);

}
